package com.lyx.question.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.lyx.common.constant.ChapterConstant;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author 14667
 * @date 2022/7/20 10:41
 */
@TableName("chapter")
@Data
public class Subject {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer chapterType;
    private Integer parentId;
    private Integer showStatus = ChapterConstant.SHOW;
    private String chapterName;

    @TableField(fill = FieldFill.INSERT)
//    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
//    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
//    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
//    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime updateTime;
}
